CXX=dlcc -x cuda

CXX_FLAGS := --cuda-gpu-arch=dlgpuc64 -std=c++11

#INCLUDES := -I../../../include

# For debug build, use the command: `make debug=1'
ifeq ($(debug),1)
  CXX_FLAGS += -DDEBUG -g
endif

SRCS = vector_add.cpp
EXECUTABLE = vector_add_nvrtc

# Build rules
all: $(EXECUTABLE)

$(EXECUTABLE): $(SRCS)
	$(CXX) $(SRCS) $(CXX_FLAGS) $(INCLUDES) -o $(EXECUTABLE)

run: $(EXECUTABLE)
	./$(EXECUTABLE)

clean:
	rm -f $(EXECUTABLE)
